package com.heima.model.article.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("ap_collection")
public class ApArticleCollection {
    public ApArticleCollection(){
        this.collectionTime = new Date();
        this.type = 0;
    }

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @TableField(value = "entry_id")
    private Integer userId;

    @TableField(value = "article_id")
    private Long articleId;

    /**
     * 点赞内容类型
     * 0文章
     * 1动态
     */
    @TableField(value = "type")
    private Short type;

    @TableField(value = "collection_time")
    private Date collectionTime;

    @TableField(value = "published_time")
    private Date publishedTime;
}
